# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.shortcuts import render

from django.http import HttpResponse

# Create your views here.


def index(request):
    return render(request, 'home.html')


# 简易计算器
def add(request):
    a = request.GET['a']
    b = request.GET['b']
    c = int(a) + int(b)
    return HttpResponse(str(c))


# /a/b/方式
def add2(request, a, b):
    c = int(a) + int(b)
    return HttpResponse(str(c))


